<?php

namespace Database\Factories;

use App\Models\UserExtract;
use Illuminate\Database\Eloquent\Factories\Factory;

class UserExtractFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = UserExtract::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'user_id' =>$this->faker->numberBetween(0, 50),
            'real_name' =>$this->faker->text(10),
            'wechat_name' =>$this->faker->text(10),
            'extract_type' =>$this->faker->randomElement(['bank', 'alipay', 'wechat']),
            'bank_code' =>$this->faker->iban,
            'bank_address' =>$this->faker->address,
            'alipay_code' =>$this->faker->phoneNumber,
            'extract_price' =>$this->faker->randomFloat(2, 1, 50000),
            'remarks' =>$this->faker->text(100),
            'balance' =>$this->faker->randomFloat(2, 1, 50000),
            'fail_msg' =>$this->faker->text(100),
            'fail_time' =>date('Y-m-d H:i:s',$this->faker->numberBetween(1601000000, time())),
            'status' =>$this->faker->randomElement(['fail', 'underreview', 'withdrawncash']),
            'wechat_code' =>$this->faker->regexify('[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}'),
            'qrcode_url' =>"http://pro.crmeb.net/uploads/store/comment/20210315/a3f0b8969086b2ea9e1effaf166f4971.png",
        ];
    }
}
